﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ServiceMonitor.Core
{


    public static class MonitorConfigExtensions
    {
        public static MonitorConfig Clone(this MonitorConfig config)
        {
            return new MonitorConfig
            {
                Id = config.Id,
                Name = config.Name,
                Type = config.Type,
                CheckInterval = config.CheckInterval,
                IsActive = config.IsActive,
                Host = config.Host,
                Port = config.Port,
                Url = config.Url,
                Timeout = config.Timeout,
                ExpectedStatus = config.ExpectedStatus,
                JarPath = config.JarPath,
                JavaArgs = config.JavaArgs,
                WorkingDirectory = config.WorkingDirectory,
                EnableEmailAlert = config.EnableEmailAlert,
                AlertEmail = config.AlertEmail
            };
        }
    }
}
